import { h } from "vue";
import { NTime, NCheckbox } from "naive-ui";

export const columns = [
  {
    title: 'id',
    key: 'id',
    width: 100
  },
  {
    title: '医院名称',
    key: 'hosname',
    width: 100,
  },
  {
    title: '医院编号',
    key: 'hoscode',
    width: 100,
  },
  {
    title: 'api基础路径',
    key: 'apiUrl',
    width: 100,
  },
  {
    title: '联系人姓名',
    key: 'contactsName',
    width: 150,
  },
  {
    title: '联系人手机',
    key: 'contactsPhone',
    width: 160,
  },
  {
    title: '状态',
    key: 'status',
    width: 90,
    render(row) {
      return row.status == 1 ? '可用': '不可用';
    },
  },
  {
    title: '创建时间',
    key: 'createTime',
    width: 100,
    render(row) {
      return h(NTime, {
        time: row.created,
        format: "yyyy-MM-dd hh:mm:ss"
      });
    },
  },
  {
    title: '更新时间',
    key: 'updateTime',
    width: 100,
    render(row) {
      return h(NTime, {
        time: row.created,
        format: "yyyy-MM-dd hh:mm:ss"
      });
    },
  },
];
